/**
 * Created by MyPC on 2017/6/18.
 */
let mysql = require('./mysql');

function query(sql, arr) {
  return new Promise(function (resolve, reject) {
    mysql.query(sql, arr, function (error, results, fields) {
      if (error) {
        reject(error);
      }
      resolve(results, fields);
    });
  })
}
module.exports.query = query;